﻿using System;
using System.Collections.Generic;
using System.Windows.Forms;

namespace eTMSUpdateService
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main(string[] args)
        {
            if (args.Length > 0)
            {
                if (args[0] == "W")
                {
                    System.Threading.Thread.Sleep(1000);
                }
            }
            Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException);
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1());
        }

        static void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e)
        {
            MessageBox.Show("Lỗi xảy ra:" + e.Exception.ToString());
            Application.Exit();
        }
    }
}
